cmake_minimum_required(VERSION 3.11)

project(xy)

set(CMAKE_CXX_STANDARD 17)
set(PROJECT_PREFIX ${PROJECT_NAME})

# 启用文件夹分类
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")

option(BUILD_TESTS "Build unit tests" ON)
option(BUILD_EXAMPLES "Build examples" ON)
option(BUILD_OCC "Build occ tests" ON)
option(BUILD_SHARED_LIBS "Build shared libraries for gtest" ON)

add_definitions(-DUNICODE -D_UNICODE)

if(BUILD_TESTS)
  enable_testing()
  include(GoogleTest)
endif()

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CMakeUtils.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake)

add_subdirectory(src)
add_subdirectory(ext)
